regularized_beta Function

public pure elemental function regularized_beta(a, b, x) result(rst)

Computes the regularized beta function.

The regularized beta function is defined as the ratio between the incomplete beta function and the beta function. .

Remarks

The routine employs the continued fraction representation of the function, evaluated by means of the modified Lentz algorithm. The leading factor is formed in logarithmic space such that the routine remains well-behaved for large arguments, where the beta function itself underflows.

See Also

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: a

The first argument of the function.

real(kind=real64), intent(in) :: b

The second argument of the function.

real(kind=real64), intent(in) :: x

The upper limit of the integration.

Return Value real(kind=real64)

The value of the regularized beta function.